import Vue from 'vue'
import Router from 'vue-router'
import Page1 from '@/components/Page1'
import Page2 from '@/components/Page2'

import login from '@/components/login'
import register from '@/components/register'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [

    {
      path: '/Page1',
      name: 'Page1',
      component: Page1,
      children: [{
        path: 'Page1/login',
        name: 'login',
        component: login,
      }, {
        path: 'Page1/register',
        name: 'register',
        component: register,
      }]
    }, {
      path: '/',
      redirect: {
        name: 'Page1',
        component: Page1
      }

    }, {
      path: '/Page2',
      name: 'Page2',
      component: Page2
    }

  ]



})
